<?php 
session_start();
include_once '../config.php';
$usrID=intval($_SESSION['usrID']);
$channelID=intval($_POST['channelID']);
$msg=$pdo->quote(nl2br($_POST['msg']));
$pdo->exec("insert into gchat set usrID=$usrID,channelID=$channelID,msg=$msg,date=unix_timestamp()");
?>